﻿using System;

namespace Borg
{
    [Serializable]
    public class ExceptionEventArgs : EventArgs
    {
        private readonly object _exceptionObject;

        public object ExceptionObject
        {
            get { return _exceptionObject; }
        }

        public Exception Exception
        {
            get { return _exceptionObject as Exception; }
        }

        public ExceptionEventArgs(object exceptionObject)
        {
            _exceptionObject = exceptionObject;
        }
    }

    public delegate void ExceptionEventHandler(ExceptionEventArgs args);
}
